package com.cuotigou.mapper;

import com.cuotigou.pojo.SOfferReward;

import java.util.List;
import java.util.Map;

public interface SOfferRewardMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SOfferReward record);

    int insertSelective(SOfferReward record);

    SOfferReward selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SOfferReward record);

    int updateByPrimaryKey(SOfferReward record);
    //热门悬赏
    List<SOfferReward> selectHotOfferReward();
    //错题悬赏
    List<SOfferReward> selectOfferRewardByStatus(Map<String,Object> map);
    //查询用户悬赏
    List<SOfferReward> selectOfferRewardListByUserId(Long userId);

    Integer selectOfferRewardIsAdoptCount(Long id);
    //查询未读回答的数量
    Integer selecIsSee(Integer userId);
    //查询错题未读回答的数量
    Integer selecOfferRewardIsSee(Long rewardId);
}